<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   xmlns:f="http://xmlns.jcp.org/jsf/core"
   xmlns:h="http://xmlns.jcp.org/jsf/html"
   xmlns:p="http://primefaces.org/ui"   
   xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
   template="/WEB-INF/templates/default.xhtml">
		
	<f:metadata>	   	
	   	<f:viewParam name="firstResult" value="#{supplierSelectorList.firstResult}"></f:viewParam>
   	</f:metadata>
	
   
   	<ui:define name="content">
   
		<h:form>
				<p:panel>
					<f:facet name="header">选择中介</f:facet>		
					<p:selectOneRadio id="agentServiceRadio"  layout="custom">
						<f:selectItems value="#{supplierSelectorList.resultList}" var="_as" itemLabel="#{_as.cnname}" itemValue="#{_as}"></f:selectItems>
						<f:converter converterId="entityConverter"></f:converter>
					</p:selectOneRadio>			
					<p:panelGrid style="width: 100%">
						<f:facet name="header">
							<p:row>
					            <p:column></p:column>
					            <p:column>
					            	<h:outputText value="中介名称" />
					            </p:column>
					            <p:column>
					            	<h:outputText value="地址" />
					            </p:column>
					        </p:row>	
						</f:facet>
						<c:forEach items="#{supplierSelectorList.resultList}" var="_suplier" varStatus="_status">
							<p:row>	
								<p:column style="width: 20px;">
									<p:radioButton for="agentServiceRadio" itemIndex="#{_status.index}" />
								</p:column>
								<p:column>
									<h:outputText value="#{_suplier.cnname}" />
								</p:column>
								<p:column style="width: 20%;">
									<h:outputText value="#{_suplier.address}" />
								</p:column>
							</p:row>					
						</c:forEach>
					</p:panelGrid>					
					<ui:include src="/WEB-INF/templates/manage/pagination.xhtml">
						<ui:param name="entityList" value="#{supplierSelectorList}" />
					</ui:include>
					
					
					<f:facet name="footer">
						<p:commandButton value="确定"  />
						<p:commandButton value="取消" onclick="" />
					</f:facet>
				</p:panel>
			</h:form>			
      
   	</ui:define>
</ui:composition>
